<?php 
/* 
Proyecto: Sistema Victoria 2.0
Programador: Felipe Guerra
Año: 2015
Flores de tumbabiro ©
*/
require_once('../core/libreria.php');
require_once('../db/connect.php'); 


if($_POST['verify'] and $_POST['verify'] == 'verify'){

	$sql = sprintf("
	INSERT INTO tipo_cliente
	(
		TIP_DESCRIPCION
	) 
	VALUES
	(
		%s
	)
	",
	GetSQLValueString($_POST['TIP_DESCRIPCION'], "text"));
	mysql_select_db($database_victoria, $victoria );
	mysql_query($sql, $victoria ) or die(mysql_error());

	$fileNom = $_GET['pn'].'List.php';
	if (isset($_SERVER['QUERY_STRING'])) {
		$fileNom .= (strpos($fileNom, '?')) ? "&" : "?";
		$fileNom .= $_SERVER['QUERY_STRING'];
	}
	header(sprintf("Location: %s", $fileNom));

}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../css/list.css" /><!--Importante, siempre debe ir antes del css del menu vertical-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>


<!-- title -->
<?php require_once('../core/title.php'); ?> 

<!-- BANNER -->
<?php require_once('../core/banner.php'); ?> 

<!-- Menú superior -->
<?php require_once('../core/menuSuperior.php'); ?> 

</head>

<body <?php require_once('../core/BodyBackground.php'); ?>  >
<br><br><br>

<table width="100%" border="0">
  <tr>
    <td width="15%" valign="top" >
		<!-- Menú Vertical -->
		<?php require_once('../core/menuVertical.php'); ?> 
    </td>
    <td width="85%" align="center" >
    <!----------------------------------------
    --------------------INICIO----------------
    ----------------------------------------->
    
    
<!--Estilos de la tabla utilizada para ver y ABC-->
<link rel="stylesheet" href="../css/tabla.css" />

<!--Javascript de la tabla utilizada para ABC-->
<script src="../js/tabla.js"></script>

<form action="" method="post" name="form" id="form" >
<table width="60%" border="1" style="background-color:#FFFFFF" class="tabla_css" >
  <tr  id="tr_encabezado" >
    <td colspan="2" id="td_encabezado">
	    Crear registro	
    </td>
  </tr>  
  <tr>
    <td class="etiqueta" width="20%" >
	    Nombre:
    </td>
    <td>
	    <input class="validar" id='TIP_DESCRIPCION' name='TIP_DESCRIPCION' type='text' value="" maxlength='50' />
    </td>
  </tr>
  <tr>
    <td colspan="2" id="td_pie">
        <input id="form-button-save" type='button' value='Guardar'  class="btn btn-large" onclick="validaRegistro($('#form'))"/>
        <a href="<?php echo $_GET['pn'].'List.php?ms='.$_GET['ms']?>" class="btn btn-large" >
			Regresar
        </a>
    </td>
  </tr>
</table>
<input id="verify" name="verify" type="hidden" value="verify"></input>
<form>

    <!----------------------------------------
    --------------------FIN-------------------
    ----------------------------------------->
    </td>
  </tr>
</table>

<div id="validaRegistro" title="&nbsp;">
<div style="text-align:center; font-size:14px"><strong>Los campos con (*) son requeridos</strong></p></div>
</div>

</body>
</html>